home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / blackscreen / blackscreen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-12  |  1.1 KB  |  41 lines

  1. /* 
  2.  * blackscreen.c --
  3.  *
  4.  *    Source code for the "blackscreen" program, which turns
  5.  *    the screen black until a character is typed.
  6.  *
  7.  * Copyright 1988 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  */
  16.  
  17. #ifndef lint
  18. static char rcsid[] = "$Header: /sprite/src/cmds/blackscreen/RCS/blackscreen.c,v 1.2 91/08/12 16:23:19 dlong Exp $ SPRITE (Berkeley)";
  19. #endif not lint
  20.  
  21. #include <stdio.h>
  22. #include <sys.h>
  23.  
  24. main(argc, argv)
  25.     int argc;
  26.     char *argv[];
  27. {
  28.     char    c;
  29.  
  30.     if (argc == 1) {
  31.     Sys_EnableDisplay(FALSE);
  32.     (void) getchar();
  33.     Sys_EnableDisplay(TRUE);
  34.     } else if (argv[1][1] == 'n') {    /* on */
  35.     Sys_EnableDisplay(TRUE);
  36.     } else {
  37.     Sys_EnableDisplay(FALSE);    /* off */
  38.     }
  39.     exit(0);
  40. }
  41.